from django.db import models

# Create your models here.
class Category(models.Model):
    category_id=models.AutoField(auto_created=True,primary_key=True)
    name=models.CharField(max_length=20,null=False)
    details=models.TextField()
    day=models.DateTimeField(auto_now_add=True,null=True)
class Garment(models.Model):
    id=models.AutoField(primary_key=True,auto_created=True)
    name=models.CharField(max_length=20,null=False)
    price=models.DecimalField(decimal_places=2,max_digits=10)
    category_id=models.ForeignKey(to=Category,on_delete=models.CASCADE,related_name='garment')